package com.lemon.cloud.admin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;

@Data
@TableName(value = "oauth_client_details")
public class OAuthClientDetails implements Serializable {

    @TableId(value = "client_id", type = IdType.INPUT)
    @Schema(description = "客户端id")
    private String clientId;

    @TableField(value = "resource_ids")
    @Schema(description = "资源ids")
    private String resourceIds;

    @TableField(value = "client_secret")
    @Schema(description = "密钥")
    private String clientSecret;

    @TableField(value = "scope")
    @Schema(description = "区域")
    private String scope;

    @TableField(value = "authorized_grant_types")
    @Schema(description = "授权类型")
    private String authorizedGrantTypes;

    @TableField(value = "web_server_redirect_uri")
    @Schema(description = "web重定向页面")
    private String webServerRedirectUri;

    @TableField(value = "authorities")
    @Schema(description = "权限")
    private String authorities;

    @TableField(value = "access_token_validity")
    @Schema(description = "token有效期")
    private Integer accessTokenValidity;

    @TableField(value = "refresh_token_validity")
    @Schema(description = "refresh_token有效期")
    private Integer refreshTokenValidity;

    @TableField(value = "additional_information")
    @Schema(description = "额外属性")
    private String additionalInformation;

    @TableField(value = "autoapprove")
    @Schema(description = "是否自动approve")
    private String autoapprove;

    private static final long serialVersionUID = 1L;
}
